<!DOCTYPE html>
<html>
<head>
    <title>查看--中软高科-2015</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css"/>
    <link rel="stylesheet" type="text/css" href="../Css/style.css"/>
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="../Js/webUtil.js"></script>

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }

        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
    <script type="text/javascript">
        $(function () {
            $('#backid').click(function () {
                window.location.href = "index.html";
            });
        });
    </script>
</head>
<body>
<form action="index.html" method="post" class="definewidth m20">
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft">编号</td>
            <td id="id">程俊</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">姓名</td>
            <td id="name">程俊</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">证件号</td>
            <td id="idNumber">534534534</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">手机</td>
            <td id="phone">13124345432</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">座机</td>
            <td id="telephone">01068765432</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">性别</td>
            <td id="sex">男</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">年龄</td>
            <td id="age">28</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">出生年月</td>
            <td id="birthday">1981-09-04</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">电子邮箱</td>
            <td id="email">chengjun@msn.com.cn</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">所属科室</td>
            <td id="department">急诊科</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">学历</td>
            <td id="degree">本科</td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">备注</td>
            <td id="comment">工作热情积极表现非常的优异</td>
        </tr>
        <tr>
            <td colspan="2">
                <center>
                    <button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
                </center>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
<script>

    function loadData() {

        let url = document.location.toString();
        let id = url.GetValue("id");

        if (id != null) {
            $.ajax({
                type: "GET",
                url: "/doctors/" + id,
                success: function (vo) {
                    if (vo.code == 200) {
                        let obj = vo.obj;
                        $("#name").html(obj.name);
                        $("#id").html(obj.id);
                        $("#phone").html(obj.phone);
                        $("#telephone").html(obj.telephone);
                        $("#email").html(obj.email);
                        $("#age").html(obj.age);
                        $("#idNumber").html(obj.idNumber);
                        $("#birthday").html(obj.birthday);
                        $("#comment").html(obj.comment);
                        $("#sex").html(obj.sex);
                        $("#degree").html(obj.degree.name);
                        $("#department").html(obj.department.name);
                        $("#state").html(obj.state);
                        $("#inTime").html(obj.inTime);
                    } else {
                        alert(vo.msg);
                    }
                }
            })
        } else {
            alert("非法ID");
        }
    }

    $(function () {
        loadData();
    })
</script>